import request from '@/utils/request'

// 查询任务分配列表
export function listProcess(query) {
  return request({
    url: '/work/process/list',
    method: 'get',
    params: query
  })
}

// 查询任务分配详细
export function getProcess(itemId) {
  return request({
    url: '/work/process/' + itemId,
    method: 'get'
  })
}

// 新增任务分配
export function addProcess(data) {
  return request({
    url: '/work/process',
    method: 'post',
    data: data
  })
}

// 修改任务分配
export function updateProcess(data) {
  return request({
    url: '/work/process',
    method: 'put',
    data: data
  })
}

// 删除任务分配
export function delProcess(itemId) {
  return request({
    url: '/work/process/' + itemId,
    method: 'delete'
  })
}

// 导出任务分配
export function exportProcess(query) {
  return request({
    url: '/work/process/export',
    method: 'get',
    params: query
  })
}

// 文件工时
export function listHours(deptId) {
  var data = {
    "deptId":deptId
  }
  return request({
    url: '/work/hours/deptList',
    method: 'post',
    data: data
  })
}

// 员工信息
export function getUsers(deptId) {
  return request({
    url: '/beiben/system/user/dept/user/'+deptId,
    method: 'get'
  })
}


// 获取文件列表
export function selectFiles(workId) {
  return request({
    url: '/work/process/files/' + workId,
    method: 'post',
  })
}


// 获取组别列表
export function groupList() {
  return request({
    url: '/system/group/group',
    method: 'post',
  })
}


// 已提交任务提醒
export function remindMeList() {
  return request({
    url: '/work/process/remindMe',
    method: 'get',
  })
}
